<template>
  <div>
    子组件: sonSync.vue
    <br>
    count的值为: {{ count }}
    <el-button @click="add">点我+1</el-button>
  </div>
</template>

<script>
export default {
  props: {
    count: {
      type: Number,
      required: true
    }
  },
  methods: {
    add() {
      this.$emit('update:count', this.count + 1)
    }
  }
}
</script>
